﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using MySql.Data.MySqlClient;
using Cinemon.MySqlConnect;

public partial class Staff_View : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
		if (Session.SessionID != null && (!IsPostBack)) {
			BindStaffMembers();
		} 
    }

	protected void BindStaffMembers() {
		using (DatabaseManager manager = new DatabaseManager()) {
			DataTable table = manager.ExecuteQuery("GetAllStaff");
			gvStaff.DataSource = table;
			gvStaff.DataBind();
		}
	}

	protected void gvStaff_PageIndexChanging(object sender, GridViewPageEventArgs e) {
		gvStaff.PageIndex = e.NewPageIndex;
		BindStaffMembers();
	}

	protected void gvStaff_PageIndexChanged(object sender, EventArgs e) {

	}

	protected void gvStaff_RowDataBound(object sender, GridViewRowEventArgs e) {

	}

}